<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>蚂蚁全能王</title>
    <link rel="stylesheet" type="text/css" href="static/admin/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="static/admin/css/admin.css"/>
    <script>
        var name = sessionStorage.getItem('userName');
        var id = sessionStorage.getItem('userId');
        if(!name || !id) {
            location.href = 'login.html'
        }
    </script>
</head>
<body>
<div class="main-layout" id='main-layout'>
    <!--侧边栏-->
    <div class="main-layout-side">
        <div class="m-logo">蚂蚁全能王管理系统</div>
        <ul class="layui-nav layui-nav-tree nav-list" lay-filter="leftNav">
            <li class="layui-nav-item layui-this">
                <a href="javascript:;" data-url="user-list.html" class="nav-link" data-id='1' data-title="用户管理">用户管理</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" data-url="goods-list.html" class="nav-link" data-id='2' data-title="商品管理">商品管理</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" data-url="order-list.html" class="nav-link" data-id='3' data-title="订单管理">订单管理</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" data-url="level-difference.html" class="nav-link" data-id='4' data-title="商品级差管理">商品级差管理</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" data-url="withdrawal.html" class="nav-link" data-id='5' data-title="提现管理">提现管理</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" data-url="royalty-list.html" class="nav-link" data-id='6' data-title="现金记录">现金记录</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" data-url="forward.html" class="nav-link" data-id='7' data-title="转账管理">转账管理</a>
            </li>
        </ul>
    </div>
    <!--右侧内容-->
    <div class="main-layout-container">
        <!--头部-->
        <div class="main-layout-header">
            <div class="menu-btn" id="hideBtn">
                <a href="javascript:;">
                    <span class="iconfont">&#xe60e;</span>
                </a>
            </div>
            <ul class="layui-nav" lay-filter="rightNav">
                <li class="layui-nav-item"><a href="javascript:;" id="logout">退出</a></li>
            </ul>
        </div>
        <!--主体内容-->
        <div class="main-layout-body">
            <!--tab 切换-->
            <div class="layui-tab layui-tab-brief main-layout-tab" lay-filter="tab" lay-allowClose="true">
                <ul class="layui-tab-title">
                    <li class="layui-this" lay-id="1">用户管理</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show" style="background: #f5f5f5;">
                        <!--1-->
                        <iframe src="user-list.html" width="100%" height="100%" name="iframe" scrolling="auto" class="iframe" framborder="0"></iframe>
                        <!--1end-->
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--遮罩-->
    <div class="main-mask"></div>
</div>
<script type="text/javascript">
    var scope = {
        link: './user-list.html'
    }
</script>
<script src="static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="static/admin/js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="static/admin/js/baseUrl.js"></script>
<script>
    layui.use(['layer', 'jquery'], function() {
        var $ = layui.jquery;
        var layer = layui.layer;
        $('#logout').click(function () {
            layer.confirm('确定退出登录吗？',{icon: 0}, function () {
                $.ajax({
                    url: baseUrl + '/loginOut',
                    type: 'post',
                    dataType: 'json',
                    contentType: 'application/json',
                    withCredentials: true,
                    xhrFields: {
                        withCredentials: true
                    }
                })
                sessionStorage.removeItem('userName');
                sessionStorage.removeItem('userId');
                location.href='login.html'
            })
        })
    });
</script>
</body>
</html>
